/*     */ package com.zimbra.cs.account;
/*     */ 
/*     */ import com.zimbra.common.localconfig.DebugConfig;
/*     */ import com.zimbra.common.mime.shim.JavaMailInternetAddress;
/*     */ import com.zimbra.common.service.ServiceException;
/*     */ import com.zimbra.common.util.ByteUtil;
/*     */ import com.zimbra.common.util.DateUtil;
/*     */ import com.zimbra.common.util.Log;
/*     */ import com.zimbra.common.util.StringUtil;
/*     */ import com.zimbra.common.util.Version;
/*     */ import com.zimbra.common.util.ZimbraLog;
/*     */ import java.util.Collections;
/*     */ import java.util.HashSet;
/*     */ import java.util.List;
/*     */ import java.util.Map;
/*     */ import java.util.Set;
/*     */ import java.util.regex.Matcher;
/*     */ import java.util.regex.Pattern;
/*     */ import javax.mail.internet.AddressException;
/*     */ import javax.mail.internet.InternetAddress;
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ public class AttributeInfo
/*     */ {
/*  43 */   private static Pattern ID_PATTERN = Pattern.compile("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$");
/*     */   
/*     */ 
/*     */ 
/*  47 */   private static Pattern GENTIME_PATTERN = Pattern.compile("^\\d{14}(\\.\\d{1,3})?[zZ]$");
/*     */   
/*  49 */   private static Pattern DURATION_PATTERN = Pattern.compile("^\\d+([hmsd]|ms)?$");
/*     */   
/*  51 */   public static String DURATION_PATTERN_DOC = "Must be in valid duration format: {digits}{time-unit}.  digits: 0-9, time-unit: [hmsd]|ms.  h - hours, m - minutes, s - seconds, d - days, ms - milliseconds.  If time unit is not specified, the default is s(seconds).";
/*     */   
/*     */ 
/*     */   protected String mName;
/*     */   
/*     */ 
/*     */   protected AttributeType mType;
/*     */   
/*     */ 
/*     */   private AttributeOrder mOrder;
/*     */   
/*     */ 
/*     */   private HashSet<String> mEnumSet;
/*     */   
/*     */ 
/*     */   private Pattern mRegex;
/*     */   
/*     */ 
/*     */   private String mValue;
/*     */   
/*     */ 
/*     */   private AttributeCallback mCallback;
/*     */   
/*     */ 
/*     */   private boolean mImmutable;
/*     */   
/*     */ 
/*     */   private AttributeCardinality mCardinality;
/*     */   
/*     */ 
/*     */   private Set<AttributeClass> mRequiredInClasses;
/*     */   
/*     */ 
/*     */   private Set<AttributeClass> mOptionalInClasses;
/*     */   
/*     */ 
/*     */   private Set<AttributeFlag> mFlags;
/*     */   
/*     */   private List<String> mGlobalConfigValues;
/*     */   
/*     */   private List<String> mGlobalConfigValuesUpgrade;
/*     */   
/*     */   protected List<String> mDefaultCOSValues;
/*     */   
/*     */   private List<String> mDefaultExternalCOSValues;
/*     */   
/*     */   private List<String> mDefaultCOSValuesUpgrade;
/*     */   
/*  99 */   private long mMin = Long.MIN_VALUE; private long mMax = Long.MAX_VALUE;
/*     */   
/* 101 */   private String mMinDuration = null; private String mMaxDuration = null;
/*     */   
/*     */   private int mId;
/*     */   
/*     */   private String mParentOid;
/*     */   
/*     */   private int mGroupId;
/*     */   
/*     */   private String mDescription;
/*     */   
/*     */   private List<AttributeServerType> mRequiresRestart;
/*     */   private List<Version> mSince;
/*     */   private Version mDeprecatedSince;
/*     */   
/*     */   private static Integer parseInt(String value)
/*     */   {
/*     */     try
/*     */     {
/* 119 */       return Integer.valueOf(Integer.parseInt(value));
/*     */     } catch (NumberFormatException e) {}
/* 121 */     return null;
/*     */   }
/*     */   
/*     */   private static Long parseLong(String value)
/*     */   {
/*     */     try {
/* 127 */       return Long.valueOf(Long.parseLong(value));
/*     */     } catch (NumberFormatException e) {}
/* 129 */     return null;
/*     */   }
/*     */   
/*     */   private static Long parseLong(String attrName, String propName, String value, long defaultValue)
/*     */   {
/* 134 */     if (!StringUtil.isNullOrEmpty(value)) {
/*     */       try {
/* 136 */         return Long.valueOf(Long.parseLong(value));
/*     */       } catch (NumberFormatException e) {
/* 138 */         ZimbraLog.misc.warn("Invalid value '%s' for property %s of attribute %s.  Defaulting to %d.", new Object[] { value, propName, attrName, Long.valueOf(defaultValue) });
/*     */         
/* 140 */         return Long.valueOf(defaultValue);
/*     */       }
/*     */     }
/* 143 */     return Long.valueOf(defaultValue);
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   protected AttributeInfo(String attrName, int id, String parentId, int groupId, AttributeCallback callback, AttributeType type, AttributeOrder order, String value, boolean immutable, String min, String max, AttributeCardinality cardinality, Set<AttributeClass> requiredIn, Set<AttributeClass> optionalIn, Set<AttributeFlag> flags, List<String> globalConfigValues, List<String> defaultCOSValues, List<String> defaultExternalCOSValues, List<String> globalConfigValuesUpgrade, List<String> defaultCOSValuesUpgrade, String description, List<AttributeServerType> requiresRestart, List<Version> since, Version deprecatedSince)
/*     */   {
/* 157 */     this.mName = attrName;
/* 158 */     this.mImmutable = immutable;
/* 159 */     this.mCallback = callback;
/* 160 */     this.mType = type;
/* 161 */     this.mOrder = order;
/* 162 */     this.mValue = value;
/* 163 */     this.mId = id;
/* 164 */     this.mParentOid = parentId;
/* 165 */     this.mGroupId = groupId;
/* 166 */     this.mCardinality = cardinality;
/* 167 */     this.mRequiredInClasses = requiredIn;
/* 168 */     this.mOptionalInClasses = optionalIn;
/* 169 */     this.mFlags = flags;
/* 170 */     this.mGlobalConfigValues = globalConfigValues;
/* 171 */     this.mGlobalConfigValuesUpgrade = globalConfigValuesUpgrade;
/* 172 */     this.mDefaultCOSValues = defaultCOSValues;
/* 173 */     this.mDefaultExternalCOSValues = defaultExternalCOSValues;
/* 174 */     this.mDefaultCOSValuesUpgrade = defaultCOSValuesUpgrade;
/* 175 */     this.mDescription = description;
/* 176 */     this.mRequiresRestart = requiresRestart;
/* 177 */     this.mSince = since;
/* 178 */     if ((this.mSince != null) && (this.mSince.size() > 1))
/*     */     {
/* 180 */       Collections.sort(this.mSince);
/*     */     }
/* 182 */     this.mDeprecatedSince = deprecatedSince;
/*     */     
/* 184 */     this.mMin = parseLong(attrName, "min", min, Long.MIN_VALUE).longValue();
/* 185 */     this.mMax = parseLong(attrName, "max", max, Long.MAX_VALUE).longValue();
/*     */     
/* 187 */     switch (this.mType) {
/*     */     case TYPE_INTEGER: 
/* 189 */       this.mMin = -2147483648L;
/* 190 */       this.mMax = 2147483647L;
/*     */       
/* 192 */       if (!StringUtil.isNullOrEmpty(min)) {
/* 193 */         Integer i = parseInt(min);
/* 194 */         if (i == null) {
/* 195 */           ZimbraLog.misc.warn("Invalid value '%s' for property %s of attribute %s.  Defaulting to %d.", new Object[] { min, "min", attrName, Long.valueOf(this.mMin) });
/*     */         }
/*     */         else {
/* 198 */           this.mMin = i.intValue();
/*     */         }
/*     */       }
/* 201 */       if (!StringUtil.isNullOrEmpty(max)) {
/* 202 */         Integer i = parseInt(max);
/* 203 */         if (i == null) {
/* 204 */           ZimbraLog.misc.warn("Invalid value '%s' for property %s of attribute %s.  Defaulting to %d.", new Object[] { max, "max", attrName, Long.valueOf(this.mMax) });
/*     */         }
/*     */         else
/* 207 */           this.mMax = i.intValue();
/*     */       }
/* 209 */       break;
/*     */     
/*     */     case TYPE_LONG: 
/* 212 */       this.mMin = Long.MIN_VALUE;
/* 213 */       this.mMax = Long.MAX_VALUE;
/*     */       
/* 215 */       if (!StringUtil.isNullOrEmpty(min)) {
/* 216 */         Long l = parseLong(min);
/* 217 */         if (l == null) {
/* 218 */           ZimbraLog.misc.warn("Invalid value '%s' for property %s of attribute %s.  Defaulting to %d.", new Object[] { min, "min", attrName, Long.valueOf(this.mMin) });
/*     */         }
/*     */         else {
/* 221 */           this.mMin = l.longValue();
/*     */         }
/*     */       }
/* 224 */       if (!StringUtil.isNullOrEmpty(max)) {
/* 225 */         Long l = parseLong(max);
/* 226 */         if (l == null) {
/* 227 */           ZimbraLog.misc.warn("Invalid value '%s' for property %s of attribute %s.  Defaulting to %d.", new Object[] { max, "max", attrName, Long.valueOf(this.mMax) });
/*     */         }
/*     */         else
/* 230 */           this.mMax = l.longValue();
/*     */       }
/* 232 */       break;
/*     */     
/*     */     case TYPE_ENUM: 
/* 235 */       String[] enums = value.split(",");
/* 236 */       this.mEnumSet = new HashSet(enums.length);
/* 237 */       for (int i = 0; i < enums.length; i++) {
/* 238 */         this.mEnumSet.add(enums[i]);
/*     */       }
/* 240 */       break;
/*     */     case TYPE_REGEX: 
/* 242 */       this.mRegex = Pattern.compile(value);
/* 243 */       break;
/*     */     case TYPE_DURATION: 
/* 245 */       this.mMin = 0L;
/* 246 */       this.mMax = Long.MAX_VALUE;
/* 247 */       this.mMinDuration = "0";
/* 248 */       this.mMaxDuration = Long.toString(this.mMax);
/*     */       
/* 250 */       if (!StringUtil.isNullOrEmpty(min)) {
/* 251 */         this.mMin = DateUtil.getTimeInterval(min, -1L);
/* 252 */         if (this.mMin < 0L) {
/* 253 */           this.mMin = 0L;
/* 254 */           ZimbraLog.misc.warn("Invalid value '%s' for property %s of attribute %s.  Defaulting to 0.", new Object[] { min, "min", attrName });
/*     */         }
/*     */         else {
/* 257 */           this.mMinDuration = min;
/*     */         }
/*     */       }
/* 260 */       if (!StringUtil.isNullOrEmpty(max)) {
/* 261 */         this.mMax = DateUtil.getTimeInterval(max, -1L);
/* 262 */         if (this.mMax < 0L) {
/* 263 */           this.mMax = Long.MAX_VALUE;
/* 264 */           ZimbraLog.misc.warn("Invalid value '%s' for property %s of attribute %s.  Defaulting to %d.", new Object[] { max, "max", attrName, Long.valueOf(this.mMax) });
/*     */         }
/*     */         else {
/* 267 */           this.mMaxDuration = max;
/*     */         }
/*     */       }
/*     */       break;
/*     */     }
/*     */   }
/*     */   
/*     */   public int getEnumValueMaxLength()
/*     */   {
/* 276 */     assert (this.mType == AttributeType.TYPE_ENUM);
/* 277 */     int max = 0;
/* 278 */     for (String s : this.mEnumSet) {
/* 279 */       int l = s.length();
/* 280 */       if (l > max) {
/* 281 */         max = l;
/*     */       }
/*     */     }
/* 284 */     return max;
/*     */   }
/*     */   
/*     */   public void checkValue(Object value, boolean checkImmutable, Map attrsToModify) throws ServiceException {
/* 288 */     if ((value == null) || ((value instanceof String))) {
/* 289 */       checkValue((String)value, checkImmutable, attrsToModify);
/* 290 */     } else if ((value instanceof String[])) {
/* 291 */       String[] values = (String[])value;
/* 292 */       for (int i = 0; i < values.length; i++) {
/* 293 */         checkValue(values[i], checkImmutable, attrsToModify);
/*     */       }
/*     */     }
/* 296 */     if ((isDeprecated()) && (!DebugConfig.allowModifyingDeprecatedAttributes)) {
/* 297 */       throw ServiceException.FAILURE("modifying deprecated attribute is not allowed: " + this.mName, null);
/*     */     }
/*     */   }
/*     */   
/*     */   protected void checkValue(String value, boolean checkImmutable, Map attrsToModify) throws ServiceException {
/* 302 */     if ((checkImmutable) && (this.mImmutable))
/* 303 */       throw ServiceException.INVALID_REQUEST(this.mName + " is immutable", null);
/* 304 */     checkValue(value, attrsToModify);
/*     */   }
/*     */   
/*     */   protected void checkValue(String value, Map attrsToModify)
/*     */     throws ServiceException
/*     */   {
/* 310 */     if ((value == null) || (value.equals(""))) {
/* 311 */       return;
/*     */     }
/* 313 */     switch (this.mType) {
/*     */     case TYPE_BOOLEAN: 
/* 315 */       if (("TRUE".equals(value)) || ("FALSE".equals(value))) {
/* 316 */         return;
/*     */       }
/* 318 */       throw AccountServiceException.INVALID_ATTR_VALUE(this.mName + " must be TRUE or FALSE", null);
/*     */     case TYPE_BINARY: 
/*     */     case TYPE_CERTIFICATE: 
/* 321 */       byte[] binary = ByteUtil.decodeLDAPBase64(value);
/* 322 */       if (binary.length > this.mMax)
/* 323 */         throw AccountServiceException.INVALID_ATTR_VALUE(this.mName + " value length(" + binary.length + ") larger than max allowed: " + this.mMax, null);
/* 324 */       return;
/*     */     case TYPE_DURATION: 
/* 326 */       if (!DURATION_PATTERN.matcher(value).matches())
/* 327 */         throw AccountServiceException.INVALID_ATTR_VALUE(this.mName + " " + DURATION_PATTERN_DOC, null);
/* 328 */       long l = DateUtil.getTimeInterval(value, 0L);
/* 329 */       if (l < this.mMin)
/* 330 */         throw AccountServiceException.INVALID_ATTR_VALUE(this.mName + " is shorter than minimum allowed: " + this.mMinDuration, null);
/* 331 */       if (l > this.mMax)
/* 332 */         throw AccountServiceException.INVALID_ATTR_VALUE(this.mName + " is longer than max allowed: " + this.mMaxDuration, null);
/* 333 */       return;
/*     */     case TYPE_EMAIL: 
/* 335 */       if (value.length() > this.mMax)
/* 336 */         throw AccountServiceException.INVALID_ATTR_VALUE(this.mName + " value length(" + value.length() + ") larger than max allowed: " + this.mMax, null);
/* 337 */       validEmailAddress(value, false);
/* 338 */       return;
/*     */     case TYPE_EMAILP: 
/* 340 */       if (value.length() > this.mMax)
/* 341 */         throw AccountServiceException.INVALID_ATTR_VALUE(this.mName + " value length(" + value.length() + ") larger than max allowed: " + this.mMax, null);
/* 342 */       validEmailAddress(value, true);
/* 343 */       return;
/*     */     case TYPE_CS_EMAILP: 
/* 345 */       if (value.length() > this.mMax)
/* 346 */         throw AccountServiceException.INVALID_ATTR_VALUE(this.mName + " value length(" + value.length() + ") larger than max allowed: " + this.mMax, null);
/* 347 */       String[] emails = value.split(",");
/* 348 */       for (String email : emails)
/* 349 */         validEmailAddress(email, true);
/* 350 */       return;
/*     */     case TYPE_ENUM: 
/* 352 */       if (this.mEnumSet.contains(value)) {
/* 353 */         return;
/*     */       }
/* 355 */       throw AccountServiceException.INVALID_ATTR_VALUE(this.mName + " must be one of: " + this.mValue, null);
/*     */     case TYPE_GENTIME: 
/* 357 */       if (GENTIME_PATTERN.matcher(value).matches()) {
/* 358 */         return;
/*     */       }
/* 360 */       throw AccountServiceException.INVALID_ATTR_VALUE(this.mName + " must be a valid generalized time: yyyyMMddHHmmssZ or yyyyMMddHHmmss.SSSZ", null);
/*     */     
/*     */ 
/*     */ 
/*     */     case TYPE_ID: 
/* 365 */       if (!Provisioning.getInstance().idIsUUID()) {
/* 366 */         return;
/*     */       }
/* 368 */       if (ID_PATTERN.matcher(value).matches()) {
/* 369 */         return;
/*     */       }
/* 371 */       throw AccountServiceException.INVALID_ATTR_VALUE(this.mName + " must be a valid id", null);
/*     */     case TYPE_INTEGER: 
/*     */       try {
/* 374 */         int v = Integer.parseInt(value);
/* 375 */         if (v < this.mMin)
/* 376 */           throw AccountServiceException.INVALID_ATTR_VALUE(this.mName + " value(" + v + ") smaller than minimum allowed: " + this.mMin, null);
/* 377 */         if (v > this.mMax)
/* 378 */           throw AccountServiceException.INVALID_ATTR_VALUE(this.mName + " value(" + v + ") larger than max allowed: " + this.mMax, null);
/* 379 */         return;
/*     */       } catch (NumberFormatException e) {
/* 381 */         throw AccountServiceException.INVALID_ATTR_VALUE(this.mName + " must be a valid integer: " + value, e);
/*     */       }
/*     */     case TYPE_LONG: 
/*     */       try {
/* 385 */         long v = Long.parseLong(value);
/* 386 */         if (v < this.mMin)
/* 387 */           throw AccountServiceException.INVALID_ATTR_VALUE(this.mName + " value(" + v + ") smaller than minimum allowed: " + this.mMin, null);
/* 388 */         if (v > this.mMax)
/* 389 */           throw AccountServiceException.INVALID_ATTR_VALUE(this.mName + " value(" + v + ") larger than max allowed: " + this.mMax, null);
/* 390 */         return;
/*     */       } catch (NumberFormatException e) {
/* 392 */         throw AccountServiceException.INVALID_ATTR_VALUE(this.mName + " must be a valid long: " + value, e);
/*     */       }
/*     */     case TYPE_PORT: 
/*     */       try {
/* 396 */         int v = Integer.parseInt(value);
/* 397 */         if ((v >= 0) && (v <= 65535))
/* 398 */           return;
/* 399 */         throw AccountServiceException.INVALID_ATTR_VALUE(this.mName + " must be a valid port: " + value, null);
/*     */       } catch (NumberFormatException e) {
/* 401 */         throw AccountServiceException.INVALID_ATTR_VALUE(this.mName + " must be a valid port: " + value, null);
/*     */       }
/*     */     case TYPE_STRING: 
/*     */     case TYPE_ASTRING: 
/*     */     case TYPE_OSTRING: 
/*     */     case TYPE_CSTRING: 
/*     */     case TYPE_PHONE: 
/* 408 */       if (value.length() > this.mMax) {
/* 409 */         throw AccountServiceException.INVALID_ATTR_VALUE(this.mName + " value length(" + value.length() + ") larger than max allowed: " + this.mMax, null);
/*     */       }
/* 411 */       return;
/*     */     case TYPE_REGEX: 
/* 413 */       if (this.mRegex.matcher(value).matches()) {
/* 414 */         return;
/*     */       }
/* 416 */       throw AccountServiceException.INVALID_ATTR_VALUE(this.mName + " must match the regex: " + this.mValue, null);
/*     */     }
/* 418 */     ZimbraLog.misc.warn("unknown type(" + this.mType + ") for attribute: " + value);
/*     */   }
/*     */   
/*     */   public static void validEmailAddress(String addr, boolean personal)
/*     */     throws ServiceException
/*     */   {
/* 424 */     if (addr.indexOf('@') == -1) {
/* 425 */       throw AccountServiceException.INVALID_ATTR_VALUE("address '" + addr + "' does not include domain", null);
/*     */     }
/*     */     try {
/* 428 */       InternetAddress ia = new JavaMailInternetAddress(addr, true);
/*     */       
/* 430 */       ia.validate();
/* 431 */       if ((!personal) && (ia.getPersonal() != null) && (!ia.getPersonal().equals("")))
/* 432 */         throw AccountServiceException.INVALID_ATTR_VALUE("invalid email address: " + addr, null);
/*     */     } catch (AddressException e) {
/* 434 */       throw AccountServiceException.INVALID_ATTR_VALUE("invalid email address: " + addr, e);
/*     */     }
/*     */   }
/*     */   
/*     */   AttributeCallback getCallback() {
/* 439 */     return this.mCallback;
/*     */   }
/*     */   
/*     */   String getName() {
/* 443 */     return this.mName;
/*     */   }
/*     */   
/*     */   boolean hasFlag(AttributeFlag flag) {
/* 447 */     if (this.mFlags == null) {
/* 448 */       return false;
/*     */     }
/* 450 */     boolean result = this.mFlags.contains(flag);
/* 451 */     return result;
/*     */   }
/*     */   
/*     */   int getId() {
/* 455 */     return this.mId;
/*     */   }
/*     */   
/*     */   Set<String> getEnumSet() {
/* 459 */     return this.mEnumSet;
/*     */   }
/*     */   
/*     */   String getParentOid() {
/* 463 */     return this.mParentOid;
/*     */   }
/*     */   
/*     */   int getGroupId() {
/* 467 */     return this.mGroupId;
/*     */   }
/*     */   
/*     */   AttributeType getType() {
/* 471 */     return this.mType;
/*     */   }
/*     */   
/*     */   AttributeOrder getOrder() {
/* 475 */     return this.mOrder;
/*     */   }
/*     */   
/*     */   public String getDescription() {
/* 479 */     if (AttributeType.TYPE_DURATION == getType()) {
/* 480 */       return this.mDescription + ".  " + DURATION_PATTERN_DOC;
/*     */     }
/* 482 */     return this.mDescription;
/*     */   }
/*     */   
/*     */   long getMax() {
/* 486 */     return this.mMax;
/*     */   }
/*     */   
/*     */   long getMin() {
/* 490 */     return this.mMin;
/*     */   }
/*     */   
/*     */   boolean requiredInClass(AttributeClass cls) {
/* 494 */     return (this.mRequiredInClasses != null) && (this.mRequiredInClasses.contains(cls));
/*     */   }
/*     */   
/*     */   boolean optionalInClass(AttributeClass cls) {
/* 498 */     return (this.mOptionalInClasses != null) && (this.mOptionalInClasses.contains(cls));
/*     */   }
/*     */   
/*     */   Set<AttributeClass> getRequiredIn() {
/* 502 */     return this.mRequiredInClasses;
/*     */   }
/*     */   
/*     */   Set<AttributeClass> getOptionalIn() {
/* 506 */     return this.mOptionalInClasses;
/*     */   }
/*     */   
/*     */   public AttributeCardinality getCardinality() {
/* 510 */     return this.mCardinality;
/*     */   }
/*     */   
/*     */   public List<String> getGlobalConfigValues() {
/* 514 */     return this.mGlobalConfigValues;
/*     */   }
/*     */   
/*     */   public List<String> getGlobalConfigValuesUpgrade() {
/* 518 */     return this.mGlobalConfigValuesUpgrade;
/*     */   }
/*     */   
/*     */   public List<String> getDefaultCosValues() {
/* 522 */     return this.mDefaultCOSValues;
/*     */   }
/*     */   
/*     */   public List<String> getDefaultExternalCosValues() {
/* 526 */     return this.mDefaultExternalCOSValues;
/*     */   }
/*     */   
/*     */   public List<String> getDefaultCosValuesUpgrade() {
/* 530 */     return this.mDefaultCOSValuesUpgrade;
/*     */   }
/*     */   
/*     */   boolean isImmutable() {
/* 534 */     return this.mImmutable;
/*     */   }
/*     */   
/*     */   String getValue() {
/* 538 */     return this.mValue;
/*     */   }
/*     */   
/*     */   public List<AttributeServerType> getRequiresRestart() {
/* 542 */     return this.mRequiresRestart;
/*     */   }
/*     */   
/*     */   public List<Version> getSince() {
/* 546 */     return this.mSince;
/*     */   }
/*     */   
/*     */   public Version getDeprecatedSince() {
/* 550 */     return this.mDeprecatedSince;
/*     */   }
/*     */   
/*     */   public boolean isDeprecated() {
/* 554 */     return getDeprecatedSince() != null;
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */   public boolean isCaseInsensitive()
/*     */   {
/* 561 */     return (AttributeType.TYPE_STRING == this.mType) || (AttributeType.TYPE_ASTRING == this.mType);
/*     */   }
/*     */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/account/AttributeInfo.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */